#include "sharpen.h"
using namespace std;

Sharpen::Sharpen()
{
    k_rows=3;
    k_cols=3;
    kernel=new double[k_rows*k_cols];
    kernel[0]=-1.0;
    kernel[1]=-1.0;
    kernel[2]=-1.0;
    kernel[3]=-1.0;
    kernel[4]=9.0;
    kernel[5]=-1.0;
    kernel[6]=-1.0;
    kernel[7]=-1.0;
    kernel[8]=-1.0;
}
Sharpen::Sharpen(double coef)
{
    k_rows=3;
    k_cols=3;
    kernel=new double[k_rows*k_cols];
    kernel[0]=-coef;
    kernel[1]=-coef;
    kernel[2]=-coef;
    kernel[3]=-coef;
    kernel[4]=8*coef+1.0;
    kernel[5]=-coef;
    kernel[6]=-coef;
    kernel[7]=-coef;
    kernel[8]=-coef;
}
Sharpen::~Sharpen(){
    delete [] kernel;
}
